import request from '@/utils/request'
import downloadRequest from '@/utils/downloadRequest'

// 查询列表数据
export function load(data) {
  return request({
    url: '/media/ad_media_type/load_media_type',
    method: 'post',
    data
  })
}

// 查询分类下拉框数据
export function listTypeInfo(data) {
  return request({
    url: '/media/ad_media_type/list_type_info',
    method: 'post',
    data
  })
}

// 保存或修改数据
export function saveOrUpdate(data) {
  return request({
    url: '/media/ad_media_type/save_or_update',
    method: 'post',
    data
  })
}

// 导出excel
export function downExcel(data) {
  return downloadRequest({
    url: '/media/ad_media_type/export',
    method: 'post',
    responseType: 'blob',
    data
  })
}
